//
//  DisCoverYouJICollectionViewCell.m
//  赵彬旭
//
//  Created by lanou3g on 16/1/15.
//  Copyright © 2016年 赵彬旭. All rights reserved.
//

#import "DisCoverYouJICollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation DisCoverYouJICollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    if (self= [super initWithFrame:frame]) {
        
        
          self.backgroundColor = [UIColor whiteColor];
        
        self.igView = [[UIImageView alloc] initWithFrame:self.contentView.bounds];
        
        self.igView.contentMode = UIViewContentModeScaleAspectFill;
        
        self.igView.layer.masksToBounds = YES;
        
        //self.igView.backgroundColor = [UIColor redColor];
        
        [self.contentView addSubview:self.igView];
        
        
    }

    return self;

}



-(void)layoutSubviews{

    [super layoutSubviews];
    

    self.igView.frame = self.contentView.bounds;

}

-(void)setModel:(DisCoverYouJIModel *)model{ //游记

    NSString *str = model.data[0][@"cover_image"];
    
    [self.igView sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:nil];
    

}


@end
